pub fn type_val(){
    let (x, y);
    (x,..) = (3, 4);
    [.., y] = [1, 2];
    println!("{} {}", x, y);
    assert_eq!([x, y], [3, 2]);

    // 可以使用 mut 将变量标记为可变
    let mut x = 1;
    x+= 2;

    println!("x = {}", x);
    // let x: i32 ; // 未初始化，但被使用
    let x: i32 = 42; // 未初始化，但被使用
    let _y: i32; // 未初始化，也未被使用 下划线命名
    println!("x is equal to {}", x);

    // 变量解构
    // let (x, y) = (1, 2);
    let (mut x, y) = (1, 2);
    x += 2;

    assert_eq!(x, 3);
    assert_eq!(y, 2);
    
    let  z = 10;
    // 应该是u8实际是u16
    let v:u16 = 28_u8 as u16;
    println!("z = {}, v = {}", z, v);
    assert_eq!(i8::MAX, 127);
    assert_eq!(u8::MAX, 255);
    
    

}
#[warn(dead_code)]
pub fn char_type(){
    let c = 'z';
    println!("{}", c);
    
}